<!DOCTYPE HTML PUBLIC "-//ORA//DTD CD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>[Chapter 1] 1.4 The java.net Package</TITLE>
<META NAME="author" CONTENT="Mark Grand and Jonathan Knudsen">
<META NAME="date" CONTENT="Fri Aug  8 16:06:38 1997">
<META NAME="form" CONTENT="html">
<META NAME="metadata" CONTENT="dublincore.0.1">
<META NAME="objecttype" CONTENT="book part">
<META NAME="otheragent" CONTENT="gmat dbtohtml">
<META NAME="publisher" CONTENT="O'Reilly &amp; Associates, Inc.">
<META NAME="source" CONTENT="SGML">
<META NAME="subject" CONTENT="Java">
<META NAME="title" CONTENT="Java Fundamental Classes Reference">
<META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">
</HEAD>
<body vlink="#551a8b" alink="#ff0000" text="#000000" bgcolor="#FFFFFF" link="#0000ee">

<DIV CLASS=htmlnav>
<H1><a href='index.htm'><IMG SRC="gifs/smbanner.gif"
     ALT="Java Fundamental Classes Reference" border=0></a></H1>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch01_03.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><B><FONT FACE="ARIEL,HELVETICA,HELV,SANSERIF" SIZE="-1">Chapter 1<br>Introduction</FONT></B></TD>
<td width=172 align=right valign=top><A HREF="ch01_05.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
</table>

&nbsp;
<hr align=left width=515>
</DIV>
<DIV CLASS=sect1>
<h2 CLASS=sect1><A CLASS="TITLE" NAME="JFC-CH-1-SECT-4">1.4 The java.net Package</A></h2>

<P CLASS=para>
The <tt CLASS=literal>java.net</tt> package contains 
classes and interfaces that provide a powerful
infrastructure for networking in Java. Many of the classes
in this package provide support for working with
sockets in Java. For example, the <tt CLASS=literal>Socket</tt>
and <tt CLASS=literal>ServerSocket</tt> classes make it possible
to implement client and server programs that communicate
using a reliable, connection-oriented protocol. The
<tt CLASS=literal>DatagramSocket</tt>, <tt CLASS=literal>DatagramPacket</tt>,
and <tt CLASS=literal>MulticastSocket</tt> classes, on the
other hand, all provide support for communication over
a connectionless protocol. The <tt CLASS=literal>MulticastSocket</tt>
class is new in Java 1.1.

<P CLASS=para>
The <tt CLASS=literal>URL</tt> and <tt CLASS=literal>URLConnection</tt>
classes define methods for working with uniform resource 
locators (URLs). The <tt CLASS=literal>URL</tt> class supports basic 
access to data stored at a URL, while <tt CLASS=literal>URLConnection</tt>
offers complete control over all aspects of working with a URL.

<P CLASS=para>
The <tt CLASS=literal>InetAddress</tt> class represents 
network addresses, so <tt CLASS=literal>InetAddress</tt> objects
are used by a number of the methods in other classes in
<tt CLASS=literal>java.net</tt>.

<P CLASS=para>
<A HREF="ch08_01.htm">Chapter 8, <i>Networking</i></A>, offers a short tutorial on using the networking classes
provided by the <tt CLASS=literal>java.net</tt> package.
See <A HREF="ch15_01.htm">Chapter 15, <i>The java.net Package</i></A>, for complete reference material on all of the
classes in this package.

</DIV>


<DIV CLASS=htmlnav>

<P>
<HR align=left width=515>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch01_03.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><a href="index.htm"><img src='gifs/txthome.gif' border=0 alt='Home'></a></td>
<td width=172 align=right valign=top><A HREF="ch01_05.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
<tr>
<td width=172 align=left valign=top>The java.io Package</td>
<td width=171 align=center valign=top><a href="index/idx_0.htm"><img src='gifs/index.gif' alt='Book Index' border=0></a></td>
<td width=172 align=right valign=top>The java.util Package</td>
</tr>
</table>
<hr align=left width=515>

<IMG SRC="gifs/smnavbar.gif" USEMAP="#map" BORDER=0> 
<MAP NAME="map"> 
<AREA SHAPE=RECT COORDS="0,0,108,15" HREF="../javanut/index.htm"
alt="Java in a Nutshell"> 
<AREA SHAPE=RECT COORDS="109,0,200,15" HREF="../langref/index.htm" 
alt="Java Language Reference"> 
<AREA SHAPE=RECT COORDS="203,0,290,15" HREF="../awt/index.htm" 
alt="Java AWT"> 
<AREA SHAPE=RECT COORDS="291,0,419,15" HREF="../fclass/index.htm" 
alt="Java Fundamental Classes"> 
<AREA SHAPE=RECT COORDS="421,0,514,15" HREF="../exp/index.htm" 
alt="Exploring Java"> 
</MAP>
</DIV>

</BODY>
</HTML>
